<template>
  <div  >
    图片预览：
     <img alt="example" style="width: 300px" src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" @click="handlePreview" /> 
  </div>
</template>
<script lang="ts" setup>  
import { api as viewerApi } from "v-viewer"; 
 
const handlePreview =   () => { 
  let files = [
    {
      src: "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png",
      "data-source": "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png",
    },
  ] 
  viewerApi({
    images: files,
  });
};
 

 
</script>
<style> 
</style>
